<!--#include file="functions.asp" -->
<%

'set cn=Server.CreateObject("ADODB.Connection")
'cn.Open "MP2ENTTEST2", "MP2", "MP2"
dim sql
dim i
dim count

sql = "SELECT ISNULL(COUNT(*),0) FROM EXILVOREQ WHERE LVONUM='" & request.querystring("ordernum") & "'"
set rs=cn.execute(sql)

count = rs(0)
set rs=nothing

for i = 1 to count
sql = " UPDATE EXILVOREQ SET "
sql = sql & "ACCTCODE='" & Request.QueryString("ACCT"&i) & "',"
sql = sql & "COSTCENTER='" & Request.QueryString("AFE"&i) & "',"
sql = sql & "ACTCODE='" & Request.QueryString("ACT"&i) & "',"
sql = sql & "DEPTEMPCODE='" & Request.QueryString("T3"&i) & "'"
sql = sql & " WHERE SEQNUM=" & request.querystring("seqnum"&i)
cn.execute(sql)
next

response.redirect "Inv_DetailLVO.asp?LVONum=" & request.querystring("ordernum")

%>